<template>
	<view class="recruitment-item">
		<view class="recruitment-item-top">
			<view class="recruitment-label">
				<text>{{item.recruitment_type }}</text>
			</view>
			<view class="recruitment-role-detail">
				<view class="item-top">
					<view class="role">
						<text>{{item.work_type_name }}</text>
					</view>
					<view class="position">
						<text>{{item.settlement_method }}</text>
					</view>
				</view>
				<view class="item-center">
					<view class="recruit-number">
						<text>招工：{{item.number }}人</text>
					</view>
					<view class="recruit-time">
						<text>{{item.data }}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="recruitment-item-bottom">

			<view class="recruit-item-condition">
				<view class="recruit-condition" v-for="(item2,index) in getAggLabel(item.labelname)" :key="index">
					<text>{{item2}}</text>
				</view>
			</view>
			<view class="browse-contact">
				<text class="browse">浏览：{{item.visit_num}}人</text>
				<text class="contact">联系：{{item.contact_num }}人</text>
			</view>
		</view>
		<view class="line"></view>
		<view class="recruitment-item-center">
			<view class="recruit-location">
				<image class="location-icon" src="../../../../static/image/job/location.png" />
				<text>{{item.city_name }}</text>
				<text>{{item.area_name }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: Object
			},
		},
		data() {
			return {
				
			}
		},
		methods: {
			getAggLabel(str) {
				return str.split(",")
			}
		},
	}
</script>

<style lang="less" scoped>
	.recruitment-item {
		.recruitment-item-top {
			display: flex;
			align-items: center;
			margin: 32rpx 34rpx;

			.recruitment-label {
				width: 80rpx;
				background: #2E68DB;
				border-radius: 6rpx;
				font-size: 30rpx;
				font-weight: 500;
				color: #FFFFFF;
				line-height: 80rpx;
				text-align: center;
			}

			.recruitment-role-detail {
				margin-left: 20rpx;
				flex: 1;

				.item-top {
					display: flex;
					align-items: center;
					margin-bottom: 4rpx;

					.role {
						font-size: 32rpx;
						font-weight: 500;
						color: #333333;
						line-height: 44rpx;
						flex: 1;
					}

					.position {

						font-size: 32rpx;
						font-weight: 500;
						color: #F49B22;
						line-height: 44rpx;
					}
				}

				.item-center {
					font-size: 28rpx;
					font-weight: 400;
					color: #666666;
					line-height: 40rpx;
					display: flex;
					align-items: center;


					.recruit-number {
						flex: 1;
					}
				}
			}
		}

		.recruitment-item-bottom {
			display: flex;
			align-items: center;
			margin: 0 34rpx 20rpx;

			.recruit-item-condition {
				flex: 1;
				display: flex;
				align-items: center;
				text-align: center;

				.recruit-condition {
					font-size: 24rpx;
					font-weight: 400;
					color: #666666;
					line-height: 34rpx;
					background: #F4F5F9;
					border-radius: 6rpx;
					margin-right: 20rpx;
					padding: 3rpx 16rpx;
				}
			}

			.browse-contact {
				font-size: 24rpx;
				font-weight: 400;
				color: #999999;
				line-height: 34rpx;

				.browse {
					margin-right: 20rpx;
				}
			}
		}

		.line {
			border-bottom: 2rpx solid #EEEEEE;
		}

		.recruitment-item-center {
			margin: 20rpx 34rpx 0rpx;

			.recruit-location {
				margin-top: 10rpx;
				display: flex;
				align-items: center;

				.location-icon {
					width: 24rpx;
					height: 32rpx;
					margin-right: 12rpx;
					display: block;
				}

				&>text {
					font-size: 24rpx;
					font-weight: 400;
					color: #999999;
					line-height: 34rpx;
					display: block;
				}
			}
		}
	}
</style>
